package com.itheima;

import com.itheima.service.BookService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author Xiao
 * @date 2021/9/11
 */
public class App04 {
    public static void main(String[] args) {
        ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");
        //NoSuchMethodException: com.itheima.service.impl.BookServiceImpl.<init>()
        BookService bookService = (BookService) ctx.getBean("bookService");
        bookService.save();
        System.out.println("factory setup...");
    }
}
